From: Colin Walters Date: Sat, 1 Feb 2025 18:45:27 +0000 (-0500) Subject: rust: Update to glib 0.20 X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2~5^2~14^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=15830906229abcde13140e1e8d65e0942484ac85;p=ostree.git rust: Update to glib 0.20 Since we're releasing a new version of our crates, let's update to the latest. Signed-off-by: Colin Walters --- diff --git a/Cargo.toml b/Cargo.toml index dbc3185d..f3037755 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,8 +37,8 @@ members = [".", "rust-bindings/sys"] base64 = "0.20.0" bitflags = "1.2.1" ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.15.0" } -gio = "0.18" -glib = "0.18" +gio = "0.20" +glib = "0.20" hex = "0.4.2" libc = "0.2" once_cell = "1.4.0" diff --git a/rust-bindings/Makefile b/rust-bindings/Makefile index ae677431..87fc32ab 100644 --- a/rust-bindings/Makefile +++ b/rust-bindings/Makefile @@ -1,6 +1,6 @@ GIR_REPO := https://github.com/gtk-rs/gir.git GIR_VERSION := 5433e2582f831d551789ee95fa04188d2a5fd3e5 # 0.20.4 -GIR_FILES_VERSION := 0.19.0 +GIR_FILES_VERSION := 0.20.0 OSTREE_REPO := ../ostree OSTREE_VERSION := patch-v2022.2 RUSTDOC_STRIPPER_VERSION := 0.1.17 diff --git a/rust-bindings/src/auto/repo.rs b/rust-bindings/src/auto/repo.rs index 583f5c1a..21ae041f 100644 --- a/rust-bindings/src/auto/repo.rs +++ b/rust-bindings/src/auto/repo.rs @@ -101,6 +101,8 @@ impl Repo { } } + #[cfg(feature = "v2024_7")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2024_7")))] #[doc(alias = "ostree_repo_checkout_composefs")] pub fn checkout_composefs(&self, options: Option<&glib::Variant>, destination_dfd: i32, destination_path: &str, checksum: &str, cancellable: Option<&impl IsA>) -> Result<(), glib::Error> { unsafe { diff --git a/rust-bindings/src/auto/versions.txt b/rust-bindings/src/auto/versions.txt index 4f5f3dd6..0ee05397 100644 --- a/rust-bindings/src/auto/versions.txt +++ b/rust-bindings/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83) -from gir-files (@ 533c8b9281ba) +from gir-files (@ b89f209a09cf) diff --git a/rust-bindings/src/repo.rs b/rust-bindings/src/repo.rs index 548cbc8e..4ced8ed7 100644 --- a/rust-bindings/src/repo.rs +++ b/rust-bindings/src/repo.rs @@ -5,7 +5,8 @@ use crate::RepoMode; use crate::{Checksum, ObjectDetails, ObjectName, ObjectType, Repo, RepoTransactionStats}; use ffi::OstreeRepoListObjectsFlags; use glib::ffi as glib_sys; -use glib::{self, translate::*, Error, IsA}; +use glib::prelude::*; +use glib::{self, translate::*, Error}; #[cfg(any(feature = "v2017_10", feature = "dox"))] use std::os::fd::BorrowedFd; use std::{ diff --git a/rust-bindings/src/sysroot.rs b/rust-bindings/src/sysroot.rs index 3d5082b5..30bccd02 100644 --- a/rust-bindings/src/sysroot.rs +++ b/rust-bindings/src/sysroot.rs @@ -74,6 +74,8 @@ impl Sysroot { #[cfg(test)] mod tests { + use gio::prelude::FileExt; + use super::*; #[test] @@ -112,6 +114,6 @@ mod tests { sysroot.path() }; - assert_eq!(path_created.to_string(), path_loaded.to_string()); + assert_eq!(path_created.path(), path_loaded.path()); } } diff --git a/rust-bindings/sys/Cargo.toml b/rust-bindings/sys/Cargo.toml index f24c765c..6312cc5b 100644 --- a/rust-bindings/sys/Cargo.toml +++ b/rust-bindings/sys/Cargo.toml @@ -5,13 +5,13 @@ system-deps = "7" libc = "0.2" [dependencies.gio-sys] -version = "0.18" +version = "0.20" [dependencies.glib-sys] -version = "0.18" +version = "0.20" [dependencies.gobject-sys] -version = "0.18" +version = "0.20" [dev-dependencies] shell-words = "1.0.0" @@ -68,7 +68,8 @@ v2022_7 = ["v2022_5"] v2023_1 = ["v2022_7"] v2023_8 = ["v2023_1"] v2023_11 = ["v2023_8"] -v2025_1 = ["v2023_11"] +v2025_1 = ["v2024_7"] +v2024_7 = ["v2023_11"] [lib] name = "ostree_sys" @@ -245,3 +246,6 @@ version = "2023.11" [package.metadata.system-deps.ostree_1.v2025_1] version = "2025.1" + +[package.metadata.system-deps.ostree_1.v2024_7] +version = "2024.7" diff --git a/rust-bindings/sys/src/auto/versions.txt b/rust-bindings/sys/src/auto/versions.txt index 4f5f3dd6..0ee05397 100644 --- a/rust-bindings/sys/src/auto/versions.txt +++ b/rust-bindings/sys/src/auto/versions.txt @@ -1,2 +1,2 @@ Generated by gir (https://github.com/gtk-rs/gir @ 5433e2582f83) -from gir-files (@ 533c8b9281ba) +from gir-files (@ b89f209a09cf) diff --git a/rust-bindings/sys/src/lib.rs b/rust-bindings/sys/src/lib.rs index 03814605..c9b57148 100644 --- a/rust-bindings/sys/src/lib.rs +++ b/rust-bindings/sys/src/lib.rs @@ -1854,6 +1854,8 @@ extern "C" { cancellable: *mut gio::GCancellable, error: *mut *mut glib::GError, ) -> gboolean; + #[cfg(feature = "v2024_7")] + #[cfg_attr(docsrs, doc(cfg(feature = "v2024_7")))] pub fn ostree_repo_checkout_composefs( self_: *mut OstreeRepo, options: *mut glib::GVariant,